3.448 \(\int \cos ^4(c+d x) (a+b \tan ^2(c+d x))^2 \, dx\)

Optimal. Leaf size=87 \[ \frac{3 \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac{1}{8} x \left (3 a^2+2 a b+3 b^2\right )+\frac{(a-b) \sin (c+d x) \cos ^3(c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d} \]

[Out]

((3*a^2 + 2*a*b + 3*b^2)*x)/8 + (3*(a^2 - b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((a - b)*Cos[c + d*x]^3*Sin[
c + d*x]*(a + b*Tan[c + d*x]^2))/(4*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0849135, antiderivative size = 87, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {3675, 413, 385, 203} \[ \frac{3 \left (a^2-b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac{1}{8} x \left (3 a^2+2 a b+3 b^2\right )+\frac{(a-b) \sin (c+d x) \cos ^3(c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4*(a + b*Tan[c + d*x]^2)^2,x]

[Out]

((3*a^2 + 2*a*b + 3*b^2)*x)/8 + (3*(a^2 - b^2)*Cos[c + d*x]*Sin[c + d*x])/(8*d) + ((a - b)*Cos[c + d*x]^3*Sin[
c + d*x]*(a + b*Tan[c + d*x]^2))/(4*d)

Rule 3675

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rule 413

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[((a*d - c*b)*x*(a + b*x^n)^
(p + 1)*(c + d*x^n)^(q - 1))/(a*b*n*(p + 1)), x] - Dist[1/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)
^(q - 2)*Simp[c*(a*d - c*b*(n*(p + 1) + 1)) + d*(a*d*(n*(q - 1) + 1) - b*c*(n*(p + q) + 1))*x^n, x], x], x] /;
 FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, n, p, q
, x]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \cos ^4(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+b x^2\right )^2}{\left (1+x^2\right )^3} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{(a-b) \cos ^3(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d}+\frac{\operatorname{Subst}\left (\int \frac{a (3 a+b)+b (a+3 b) x^2}{\left (1+x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{4 d}\\ &=\frac{3 \left (a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac{(a-b) \cos ^3(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d}+\frac{\left (3 a^2+2 a b+3 b^2\right ) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{8 d}\\ &=\frac{1}{8} \left (3 a^2+2 a b+3 b^2\right ) x+\frac{3 \left (a^2-b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac{(a-b) \cos ^3(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{4 d}\\ \end{align*}

Mathematica [A]  time = 0.323917, size = 65, normalized size = 0.75 \[ \frac{4 \left (3 a^2+2 a b+3 b^2\right ) (c+d x)+8 \left (a^2-b^2\right ) \sin (2 (c+d x))+(a-b)^2 \sin (4 (c+d x))}{32 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4*(a + b*Tan[c + d*x]^2)^2,x]

[Out]

(4*(3*a^2 + 2*a*b + 3*b^2)*(c + d*x) + 8*(a^2 - b^2)*Sin[2*(c + d*x)] + (a - b)^2*Sin[4*(c + d*x)])/(32*d)

________________________________________________________________________________________

Maple [A]  time = 0.044, size = 122, normalized size = 1.4 \begin{align*}{\frac{1}{d} \left ({b}^{2} \left ( -{\frac{\cos \left ( dx+c \right ) }{4} \left ( \left ( \sin \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\sin \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) +2\,ab \left ( -1/4\,\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{3}+1/8\,\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) +1/8\,dx+c/8 \right ) +{a}^{2} \left ({\frac{\sin \left ( dx+c \right ) }{4} \left ( \left ( \cos \left ( dx+c \right ) \right ) ^{3}+{\frac{3\,\cos \left ( dx+c \right ) }{2}} \right ) }+{\frac{3\,dx}{8}}+{\frac{3\,c}{8}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*(a+b*tan(d*x+c)^2)^2,x)

[Out]

1/d*(b^2*(-1/4*(sin(d*x+c)^3+3/2*sin(d*x+c))*cos(d*x+c)+3/8*d*x+3/8*c)+2*a*b*(-1/4*sin(d*x+c)*cos(d*x+c)^3+1/8
*cos(d*x+c)*sin(d*x+c)+1/8*d*x+1/8*c)+a^2*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c))

________________________________________________________________________________________

Maxima [A]  time = 1.58422, size = 131, normalized size = 1.51 \begin{align*} \frac{{\left (3 \, a^{2} + 2 \, a b + 3 \, b^{2}\right )}{\left (d x + c\right )} + \frac{{\left (3 \, a^{2} + 2 \, a b - 5 \, b^{2}\right )} \tan \left (d x + c\right )^{3} +{\left (5 \, a^{2} - 2 \, a b - 3 \, b^{2}\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+b*tan(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/8*((3*a^2 + 2*a*b + 3*b^2)*(d*x + c) + ((3*a^2 + 2*a*b - 5*b^2)*tan(d*x + c)^3 + (5*a^2 - 2*a*b - 3*b^2)*tan
(d*x + c))/(tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

Fricas [A]  time = 1.38311, size = 176, normalized size = 2.02 \begin{align*} \frac{{\left (3 \, a^{2} + 2 \, a b + 3 \, b^{2}\right )} d x +{\left (2 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{3} +{\left (3 \, a^{2} + 2 \, a b - 5 \, b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+b*tan(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

1/8*((3*a^2 + 2*a*b + 3*b^2)*d*x + (2*(a^2 - 2*a*b + b^2)*cos(d*x + c)^3 + (3*a^2 + 2*a*b - 5*b^2)*cos(d*x + c
))*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*(a+b*tan(d*x+c)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 47.8567, size = 5287, normalized size = 60.77 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+b*tan(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/32*(3*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*
tan(c))*tan(d*x)^4*tan(c)^4 - 5*pi*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*ta
n(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(c)^4 + 12*a^2*d*x*tan(d*x)^4*tan(c)^4 + 8*a*b*d*x*tan(d*x)^4*ta
n(c)^4 + 12*b^2*d*x*tan(d*x)^4*tan(c)^4 + 3*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x)
 - 2*tan(c))*tan(d*x)^4*tan(c)^4 - 5*pi*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*ta
n(c))*tan(d*x)^4*tan(c)^4 + 6*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(
c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(c)^2 - 10*pi*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2
*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(c)^2 + 6*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^
2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*tan(c)^4 - 10*pi*b^2
*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*
x)^2*tan(c)^4 + 6*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^4*tan(c)^4 - 10*b^2*arctan((t
an(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^4*tan(c)^4 - 6*a*b*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan
(c) + 1))*tan(d*x)^4*tan(c)^4 + 10*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(d*x)^4*tan(c)^4
+ 24*a^2*d*x*tan(d*x)^4*tan(c)^2 + 16*a*b*d*x*tan(d*x)^4*tan(c)^2 + 24*b^2*d*x*tan(d*x)^4*tan(c)^2 + 6*pi*a*b*
sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(c)^2 - 10*pi*b^2*sgn(-2
*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(c)^2 + 24*a^2*d*x*tan(d*x)^2*
tan(c)^4 + 16*a*b*d*x*tan(d*x)^2*tan(c)^4 + 24*b^2*d*x*tan(d*x)^2*tan(c)^4 + 6*pi*a*b*sgn(-2*tan(d*x)^2*tan(c)
 + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*tan(c)^4 - 10*pi*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*t
an(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*tan(c)^4 + 3*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2
*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4 - 5*pi*b^2*sgn(2*tan(d*x)^2*tan(c
)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4 + 12*pi*a*b*sgn(2*
tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*ta
n(c)^2 - 20*pi*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x)
- 2*tan(c))*tan(d*x)^2*tan(c)^2 + 12*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^4*tan(c)^2
 - 20*b^2*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^4*tan(c)^2 - 12*a*b*arctan(-(tan(d*x) - t
an(c))/(tan(d*x)*tan(c) + 1))*tan(d*x)^4*tan(c)^2 + 20*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*
tan(d*x)^4*tan(c)^2 - 20*a^2*tan(d*x)^4*tan(c)^3 + 8*a*b*tan(d*x)^4*tan(c)^3 + 12*b^2*tan(d*x)^4*tan(c)^3 + 3*
pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*
tan(c)^4 - 5*pi*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x)
 - 2*tan(c))*tan(c)^4 + 12*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^2*tan(c)^4 - 20*b^2*
arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^2*tan(c)^4 - 12*a*b*arctan(-(tan(d*x) - tan(c))/(ta
n(d*x)*tan(c) + 1))*tan(d*x)^2*tan(c)^4 + 20*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(d*x)^2
*tan(c)^4 - 20*a^2*tan(d*x)^3*tan(c)^4 + 8*a*b*tan(d*x)^3*tan(c)^4 + 12*b^2*tan(d*x)^3*tan(c)^4 + 12*a^2*d*x*t
an(d*x)^4 + 8*a*b*d*x*tan(d*x)^4 + 12*b^2*d*x*tan(d*x)^4 + 3*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(
c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4 - 5*pi*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x
) - 2*tan(c))*tan(d*x)^4 + 48*a^2*d*x*tan(d*x)^2*tan(c)^2 + 32*a*b*d*x*tan(d*x)^2*tan(c)^2 + 48*b^2*d*x*tan(d*
x)^2*tan(c)^2 + 12*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*t
an(c)^2 - 20*pi*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2*tan(c)^
2 + 12*a^2*d*x*tan(c)^4 + 8*a*b*d*x*tan(c)^4 + 12*b^2*d*x*tan(c)^4 + 3*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan
(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(c)^4 - 5*pi*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2
*tan(d*x) - 2*tan(c))*tan(c)^4 + 6*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)
*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2 - 10*pi*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan
(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^2 + 6*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan
(c) - 1))*tan(d*x)^4 - 10*b^2*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^4 - 6*a*b*arctan(-(ta
n(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(d*x)^4 + 10*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))
*tan(d*x)^4 - 12*a^2*tan(d*x)^4*tan(c) - 8*a*b*tan(d*x)^4*tan(c) + 20*b^2*tan(d*x)^4*tan(c) + 6*pi*a*b*sgn(2*t
an(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(c)^2 - 10*
pi*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*
tan(c)^2 + 24*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^2*tan(c)^2 - 40*b^2*arctan((tan(d
*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^2*tan(c)^2 - 24*a*b*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c)
 + 1))*tan(d*x)^2*tan(c)^2 + 40*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(d*x)^2*tan(c)^2 + 2
4*a^2*tan(d*x)^3*tan(c)^2 - 48*a*b*tan(d*x)^3*tan(c)^2 + 24*b^2*tan(d*x)^3*tan(c)^2 + 24*a^2*tan(d*x)^2*tan(c)
^3 - 48*a*b*tan(d*x)^2*tan(c)^3 + 24*b^2*tan(d*x)^2*tan(c)^3 + 6*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(
c) - 1))*tan(c)^4 - 10*b^2*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(c)^4 - 6*a*b*arctan(-(tan(d*x
) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(c)^4 + 10*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(c)
^4 - 12*a^2*tan(d*x)*tan(c)^4 - 8*a*b*tan(d*x)*tan(c)^4 + 20*b^2*tan(d*x)*tan(c)^4 + 24*a^2*d*x*tan(d*x)^2 + 1
6*a*b*d*x*tan(d*x)^2 + 24*b^2*d*x*tan(d*x)^2 + 6*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan
(d*x) - 2*tan(c))*tan(d*x)^2 - 10*pi*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c
))*tan(d*x)^2 + 24*a^2*d*x*tan(c)^2 + 16*a*b*d*x*tan(c)^2 + 24*b^2*d*x*tan(c)^2 + 6*pi*a*b*sgn(-2*tan(d*x)^2*t
an(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(c)^2 - 10*pi*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x
)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(c)^2 + 3*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c
) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c)) - 5*pi*b^2*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*t
an(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c)) + 12*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1)
)*tan(d*x)^2 - 20*b^2*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^2 - 12*a*b*arctan(-(tan(d*x)
- tan(c))/(tan(d*x)*tan(c) + 1))*tan(d*x)^2 + 20*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(d*
x)^2 + 12*a^2*tan(d*x)^3 + 8*a*b*tan(d*x)^3 - 20*b^2*tan(d*x)^3 - 24*a^2*tan(d*x)^2*tan(c) + 48*a*b*tan(d*x)^2
*tan(c) - 24*b^2*tan(d*x)^2*tan(c) + 12*a*b*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(c)^2 - 20*b^
2*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(c)^2 - 12*a*b*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*ta
n(c) + 1))*tan(c)^2 + 20*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*tan(c)^2 - 24*a^2*tan(d*x)*tan
(c)^2 + 48*a*b*tan(d*x)*tan(c)^2 - 24*b^2*tan(d*x)*tan(c)^2 + 12*a^2*tan(c)^3 + 8*a*b*tan(c)^3 - 20*b^2*tan(c)
^3 + 12*a^2*d*x + 8*a*b*d*x + 12*b^2*d*x + 3*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x
) - 2*tan(c)) - 5*pi*b^2*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c)) + 6*a*b*arcta
n((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1)) - 10*b^2*arctan((tan(d*x) + tan(c))/(tan(d*x)*tan(c) - 1)) - 6*a*
b*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1)) + 10*b^2*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1
)) + 20*a^2*tan(d*x) - 8*a*b*tan(d*x) - 12*b^2*tan(d*x) + 20*a^2*tan(c) - 8*a*b*tan(c) - 12*b^2*tan(c))/(d*tan
(d*x)^4*tan(c)^4 + 2*d*tan(d*x)^4*tan(c)^2 + 2*d*tan(d*x)^2*tan(c)^4 + d*tan(d*x)^4 + 4*d*tan(d*x)^2*tan(c)^2
+ d*tan(c)^4 + 2*d*tan(d*x)^2 + 2*d*tan(c)^2 + d)